package Day3Demo;

/**
 * @author PHUNG Nam Can - NakanPhung
 * @mail cank56hua@gmail.com
 * @date Jul 22, 2013 7:56:03 PM
 * @project Day3Demo
 * @file Calcalator.java
 */

public class Calculator {

	public static int add(int a, int b) {

		return (a + b);
	}

	public int sub(int a, int b) {

		return (a - b);
	}

	public int adds(int... a) {
		// (int... a) khai bao 1 mang a.voi nhieu gia tri vao.
		int result = 0;

		for (int i = 0; i < a.length; i++) {
			result += a[i];
		}
		return result;

	}

}
